<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ include file="../common/taglibs.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <title>开通微信扫码审核</title>
    <link rel="icon" href="favicon.ico" type="image/x-icon"/>
    <!-- 当前页面样式 -->
    <link rel="stylesheet" href="<s:url value="/css/common.css"/>"/>
    <!-- 当前页面样式 END -->
    <script type="text/javascript" src="<c:url value="/js/jquery-1.3.2.js" />"></script>
	<script type="text/javascript" src="<c:url value="/js/common.js" />"></script>
	<script type="text/javascript" src="<c:url value="/js/My97DatePicker/WdatePicker.js"/>"></script>
	<script type="text/javascript">
	$(document).ready(function(){
		$('#op').click(function(){
			var obj=$("input[name=multiSel]:checked");
			if(obj.length!=1){
				alert("请选择一条记录");
				return false;
			}
			var idd = obj.val();							
			$("#queryUserForm").attr("action","<%=basePath%>/scanCodeAudit/initAudit.ct?scanCodeAudit.mchtCd="+idd);
			$("#queryUserForm").submit();
			$("#queryBtnId").attr("disabled",true);
			$("#op").attr("disabled",true);
		});		
		$('#queryBtnId').click(function(){
			$("#queryUserForm").attr("action","<%=basePath%>/scanCodeAudit/queryMerinfo.ct");
			$("#queryUserForm").submit();
			$("#queryBtnId").attr("disabled",true);
			$("#op").attr("disabled",true);
		});

	});
	</script>
</head>
<body>
<s:form id="queryUserForm" action="/scanCodeAudit/queryMerinfo.ct" method="post" theme="simple">
<table class="tb">
    <tbody>
        <tr class="tb-line">
            <td class="tb-td" colspan="4"><div class="tb-h2">POS收单运营管理平台</div></td>
        </tr>

        <tr class="tb-line">
            <td class="tb-td" colspan="4"><div class="tb-h3">微信扫码认证</div></td>
        </tr>
		<tr class="tb-line">
            
            <td align="right" class="tb-td">
                <div class="tb-h4">商户号：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-normal">
                <s:textfield name="searchCondition.mcthCd" cssClass="queryWidth"></s:textfield>
                </label>
            </td>
            
            <td align="right" class="tb-td">
                <div class="tb-h4">申请日期：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-mini">
                <s:textfield id="dateMin" name="searchCondition.dateMin" placeholder="起始日期" onFocus="WdatePicker({dateFmt:'yyyyMMdd',readOnly:true,wdate:true,errDealMode:0});" cssClass="queryWidth"></s:textfield>
                </label>-
                <label class="tb-input-mini">
                <s:textfield id="dateMax" name="searchCondition.dateMax" placeholder="结束日期" onFocus="WdatePicker({dateFmt:'yyyyMMdd',readOnly:true,wdate:true,errDealMode:0});" cssClass="queryWidth"></s:textfield>
                </label>
            </td>
        </tr>
        <tr class="tb-line">
            
            <td align="right" class="tb-td">
                <div class="tb-h4">微信号：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-normal">
               <s:textfield name="searchCondition.wxId" cssClass="queryWidth"></s:textfield>
                </label>
            </td>
            
           <td align="right" class="tb-td">
                <div class="tb-h4">微信名：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-normal">
                <s:textfield name="searchCondition.wxName" cssClass="queryWidth"></s:textfield>
                </label>
            </td>
        </tr>
         <tr class="tb-line">
         	 <td align="right" class="tb-td">
                <div class="tb-h4">认证状态：</div>
            </td>
            <td class="tb-td">
                <label class="tb-select">
				 			<s:select name="searchCondition.status"  list="#{'01':'待认证','00':'认证失败','02':'认证成功'}" cssClass="queryWidth"/> 
                </label>
            </td>
         </tr>
		<tr>
						<td colspan="4" align="center"><span style="color: red"><s:actionerror /></span>
							<span style="color: red;" id="tips"><s:actionmessage /></span > <span style="color: red;"><s:fielderror
									cssClass="fieldError" /></span>
							<span id="otherError"></span>
						</td>
		</tr>
        
        <tr class="tb-line">
            <td class="tb-td line-submit" align="right" colspan="4">
                <label class="tb-input-submit">
                    <input id="queryBtnId" type="button" value="查询" />
                </label>
                <label class="tb-input-submit">
                    <input type="reset" id="res" value="取消"/>
                </label>
                 <label class="tb-input-submit">
                    <s:if test="#request.searchRsList != null && #request.searchRsList.size>0 && searchCondition.status== \"01\" " >
               		<input id="op" value="认证" type="button" />
               		</s:if>
               		<s:else>
               			<input id="op" disabled="disabled" value="认证" type="button" />
               		</s:else>
               </label>
            </td>
        </tr>
        <s:if test="#request.searchRsList != null && #request.searchRsList.size>0">
			<tr class="tb-line">
				<td class="tb-td paging"  align="left" colspan="4"> <page:pageCount
								max_pages="11" totalPage="${requestScope.totalPage}"
								currentPage="${requestScope.currentPage}"
								action="${rootPath}/scanCodeAudit/queryMerinfo.ct?currentPage=" />

				</td>
			</tr>
		</s:if>
    </tbody>
</table>

<div class="big-tb">
    <table class="tb" style="width: 100%;">
        <thead>
            <tr class="tb-line">
                <th class="tb-th" colspan="16">商户信息列表</th>
            </tr>
            <tr class="tb-line bg-gray">
            	<s:if test="#request.searchRsList != null && #request.searchRsList.size>0 && searchCondition.status== \"01\"">
                   			<th class="tb-th">
                   			选择
                   			</th>
                </s:if>
                <th class="tb-th">商户号</th>
                <th class="tb-th">商户名称</th>
                 <th class="tb-th">已认证次数</th>               
                <th class="tb-th">联系人微信号</th>
                <th class="tb-th">联系人微信姓名</th>
                <th class="tb-th">微信子商户号</th>
                <th class="tb-th">状态</th>
                <th class="tb-th">申请日期</th>
            </tr>
        </thead>
        <tbody>
			<s:iterator value="#request.searchRsList" status="stat" id="bean">
				<tr  class="tb-line"  >
					<s:if test="#request.searchRsList != null && #request.searchRsList.size>0 && searchCondition.status== \"01\" ">
							<td class="tb-td" align="center">                 			
                   				<input name="multiSel" value="<s:property value="#bean.mchtCd"/>" type="checkbox" />
                   			</td>
                	</s:if>
					<td class="tb-td">
						<s:property value="#bean.mchtCd"/>
					</td>
					<td class="tb-td">
						<s:property value="#bean.name"/>
					</td>
					<td class="tb-td">
						<s:property value="#bean.counts"/>
					</td>
					<td class="tb-td">
						<s:property value="#bean.wxId"/>
					</td>
					<td class="tb-td">
						<s:property value="#bean.wxName"/>
					</td>
					<td class="tb-td">
						<s:property value="#bean.subid"/>
					</td>
					<td class="tb-td">
						<s:if test="#bean.status == \"01\" ">
							待认证
						</s:if>
						<s:elseif test="#bean.status == \"00\"">
							认证失败
						</s:elseif>
						<s:elseif test="#bean.status == \"02\"">
							认证成功
						</s:elseif>
					</td>
					<td class="tb-td">
						<s:property value="#bean.date"/>
					</td>					
				</tr>
			</s:iterator>
        </tbody>
    </table>
</div>
</s:form>
</body>
</html>